package cn.three.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import cn.three.biz.ShopdaoBiz;
import cn.three.eneity.Shop;

public class buyservlet extends HttpServlet{

	
	
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
			int id=Integer.parseInt(req.getParameter("shopid")) ;
			ShopdaoBiz biz=new ShopdaoBiz();
			Shop shop=biz.getShopById(id);
			HttpSession session =req.getSession();
			if(shop!=null){
				session.setAttribute("shop", shop);
				resp.sendRedirect("");
				
			}else{
				resp.sendRedirect("");
			}
		
	
	}
}
